'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
    async create() {
        const {
            ctx,
        } = this;
        ctx.body = await ctx.service.user.create(ctx.request.body);
    }

    // 获取用户信息
    async userInfo() {
        const {
            ctx,
        } = this;
        ctx.body = await ctx.service.user.userInfo(ctx.request.query);
    }
    async login() {
        const {
            ctx,
        } = this;
        ctx.body = await ctx.service.user.login(ctx.request.body);
    }

}

module.exports = UserController;